class PizzaMaker < ActiveRecord::Base
  has_one :account, :as => :user, :validate => true
  belongs_to :restaurant

  validates_presence_of :name, :surname, :phonenumber
  validates_numericality_of :phonenumber, :only_integer => true
  validates_each :name, :surname do |record, attr, value|
    value.downcase!
    value.capitalize!
  end
end
